package com.sky.service;

import com.sky.dao.UserMapper;
import com.sky.model.BaseModel;
import com.sky.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author zhijun.guo
 * @create 2019-02-11 16:19
 **/
@Service
public class UserService {

    @Autowired
    UserMapper userMapper;

    public boolean login(String username,String password){
        User user = userMapper.selectByloginInfo(username,password);
        if(user == null){
            return false;
        }else{
            return true;
        }
    }

    public List<BaseModel> query(User user){
        return userMapper.query(user);
    }

}
